﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>@ViewBag.Title - SocialBuy</title>
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <meta name="viewport" content="width=device-width" />
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/jqueryui")
    <link rel="stylesheet" href="/Content/font-awesome.css" />
    <link rel="stylesheet" href="/Content/select2.css" />
    <link rel="stylesheet" href="/Content/themes/base/jquery-ui.css" />
    <script src="/Scripts/jquery.filedrop.js"></script>
    <script src="/Scripts/upload.js"></script>
    <script src="/Scripts/bootstrap.min.js"></script>
    <script src="/Scripts/jquery.maskedinput.min.js"></script>
    <script src="/Scripts/select2.min.js"></script>
    <script src="/Scripts/search.js"></script>
    @Scripts.Render("~/bundles/default")
    <script src="/Scripts/knockout-2.2.1.js"></script>

    <script src="/Scripts/cart.js"></script>

    <link rel="stylesheet" href="/Scripts/jquery.pnotify.default.css" />
    <script src="/Scripts/jquery.pnotify.min.js"></script>
</head>
<body>
    <div id="content-header">
        @Html.Partial("_Header");
    </div>
    <div class="page">
        <div class="statistic-content-header">
            <div class="page-title">@Html.Raw(ViewBag.Title)</div>
            <div class="statistic-content-body">
                @RenderBody()
            </div>
        </div>
        @RenderSection("featured", required: false)
    </div>

    @RenderSection("scripts", required: false)
    <script>
        $(".modal").on("show", function () {
            $(".modal").not(this).modal("hide");
        });
        //$('[rel=tooltip]').tooltip();
        $("#cart > a").click(function () {
            $("#cart > .cart-container").toggle(300);
        })
        $(document).click(function () {
            $(".cart-container").hide(200);
        })
        $(".cart-container,#cart > a").click(function (e) {
            e.preventDefault();
            return false;
        });
        $("[class*=logo], #logo").click(function () {
            location.href = "/";
        });

        var cateListDom = $("#cateList");
        $.getJSON('/Category/Dropdown', function (data) {
            $.each(data, function (key, val) {
                cateListDom.append('<li class="nav-header">'+val.text+'</li>')
                $.each(val.children, function(k, v) {
                    cateListDom.append('<li><a href="/Product/Category?id='+ v['id'] + '">'+ v.text +'</a></li>')
                });
            });
        });
    </script>
</body>
</html>
